home *** CD-ROM | disk | FTP | other *** search
- #ifndef __C3DTextView__
- #define __C3DTextView__
- #define __C3DTEXTVIEW__
-
- #include "C3DView.h"
-
- //------------------------------------------------------------------------------
- // Class definition
- //------------------------------------------------------------------------------
-
- class C3DTextView : public C3DView
- {
-
- // Initialization and cleanup
- public:
- C3DTextView();
-
- // Drawing
- public:
- virtual void Draw3D(const DrawContext * context); // override
-
- // Access
- public:
- void SetText ( const DrawContext * context, const char * text, Boolean redraw );
- void GetText(char * text);
-
- void SetTextColor(const DrawContext * context, const RGBColor & textColor, Boolean redraw);
- void GetTextColor(RGBColor * textColor);
-
- void SetFontParams(void);
-
- protected:
- // calculates mTextLocation. returns true if the text fits in the view
- Boolean PlaceText(const DrawContext * context, const StringPtr text);
-
- // Instance variables
- protected:
- Str255 mText; // the text to be displayed
- RGBColor mTextColor; // the color of the text
- Point mTextLocation; // where the text gets drawn
-
- };
-
- #endif __C3DTextView__
-